<template>
    <div>
        <p>作者：<input type="text" v-model="name"></p>
        <p><input type="button" @click="login()" value="登录"></p>
    </div>
</template>

<script>
import {ZC_author_login} from '../axios_send/api.js'
export default {
    name:"aloginss",
    data(){
        return{
            name:"",
        }
    },
    methods:{
        login(){
            var data={"name":name}
            console.log(data);
            
            ZC_author_login(data)
            .then(res=>{
                console.log(res);
                if(res.code==200){
                    this.$router.push({path:""})
                }else{
                    alert("登录失败啦，重新试试")
                }
            })
        }
    }
}
</script>

<style>

</style>
